<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"  
  "http://www.w3.org/TR/html4/loose.dtd">  
<html > 
<head><title>XML Geometry Descriptors</title> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
<meta name="generator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)"> 
<meta name="originator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)"> 
<!-- html --> 
<meta name="src" content="XMLDescriptors.tex"> 
<meta name="date" content="2007-10-11 19:49:00"> 
<link rel="stylesheet" type="text/css" href="XMLDescriptors.css"> 
</head><body 
>
   <div class="maketitle">



<h2 class="titleHead">XML Geometry Descriptors</h2>
<div class="author" ><span 
class="ptmr7t-x-x-144">Vincent Hoon</span></div>
<br />
<div class="date" ></div>
   </div>
   <h3 class="likesectionHead"><a 
 id="x1-1000"></a>Contents</h3>
   <div class="tableofcontents">
   <span class="sectionToc" >1 <a 
href="#x1-20001" id="QQ2-1-2">Basic Format</a></span>
<br />   &#x00A0;<span class="subsectionToc" >1.1 <a 
href="#x1-30001.1" id="QQ2-1-4">Particle Attributes</a></span>
<br />   <span class="sectionToc" >2 <a 
href="#x1-40002" id="QQ2-1-7">Primitives</a></span>
<br />   &#x00A0;<span class="subsectionToc" >2.1 <a 
href="#x1-50002.1" id="QQ2-1-8">Transformation Tags</a></span>
<br />   &#x00A0;<span class="subsectionToc" >2.2 <a 
href="#x1-60002.2" id="QQ2-1-10">Primitive Types</a></span>
<br />   &#x00A0;&#x00A0;<span class="subsubsectionToc" >2.2.1 <a 
href="#x1-70002.2.1" id="QQ2-1-11">Sphere</a></span>
<br />   &#x00A0;&#x00A0;<span class="subsubsectionToc" >2.2.2 <a 
href="#x1-80002.2.2" id="QQ2-1-13">Cap</a></span>
<br />   &#x00A0;&#x00A0;<span class="subsubsectionToc" >2.2.3 <a 
href="#x1-90002.2.3" id="QQ2-1-15">Cylinder</a></span>
<br />   &#x00A0;&#x00A0;<span class="subsubsectionToc" >2.2.4 <a 
href="#x1-100002.2.4" id="QQ2-1-17">Cone</a></span>
<br />   &#x00A0;&#x00A0;<span class="subsubsectionToc" >2.2.5 <a 
href="#x1-110002.2.5" id="QQ2-1-20">Plate</a></span>
<br />   &#x00A0;&#x00A0;<span class="subsubsectionToc" >2.2.6 <a 
href="#x1-120002.2.6" id="QQ2-1-21">Line</a></span>
<br />   &#x00A0;&#x00A0;<span class="subsubsectionToc" >2.2.7 <a 
href="#x1-130002.2.7" id="QQ2-1-22">File</a></span>
<br />   &#x00A0;&#x00A0;<span class="subsubsectionToc" >2.2.8 <a 
href="#x1-140002.2.8" id="QQ2-1-24">OBJFile</a></span>
<br />   <span class="sectionToc" >3 <a 
href="#x1-150003" id="QQ2-1-26">Static Geometry</a></span>
<br />   <span class="sectionToc" >4 <a 
href="#x1-160004" id="QQ2-1-27">Scene Settings</a></span>
<br />   <span class="sectionToc" >5 <a 
href="#x1-170005" id="QQ2-1-28">Miscellaneous Features</a></span>
<br />   <span class="sectionToc" >6 <a 
href="#x1-180006" id="QQ2-1-29">Examples</a></span>
<br />   &#x00A0;<span class="subsectionToc" >6.1 <a 
href="#x1-190006.1" id="QQ2-1-30">Spheres</a></span>
<br />   &#x00A0;<span class="subsectionToc" >6.2 <a 
href="#x1-200006.2" id="QQ2-1-33">Composite Geometries</a></span>
   </div>

<a 
 id="x1-1000doc"></a>
<!--l. 16--><p class="indent" >   Representing the state of a discrete particle simulation at a point in time is straightforward: the
centerpoint of each particle is specified in space. The orientation of the particle may also be specified in
the form of a quaternion or a set of Euler angles. In ParticleVis, each frame of data is represented as a list
of these states, and a state file is used for storage of the frames.
<!--l. 21--><p class="indent" >   This format is an effictive way to store simulation data, but the problem of specifying the actual
geometric shape of each particle remains. In order to maximize the flexibility of the visualization system,
a human-readable markup file format was devised to describe the geometry of a set of particles associated
with a state file. The Extensible Markup Language (XML) provided the basis for this format. While the
XML data is not rigorously validated, an existing XML parser can be used to easily process
the input file. The vocabulary is designed to be simple and easily modified or generated by
end-users.
<!--l. 30--><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">1    </span> <a 
 id="x1-20001"></a>Basic Format</h3>
<!--l. 32--><p class="noindent" >The format, referred to as an XML geometry descriptor, is designed to match the implicit ordering of
particles in a statefile. The markup format of XML is well-suited to a hierarchy of particle attributes. Each
piece of information in the XML file is delimited by a set of markup tags of the form <span 
class="pcrr7t-x-x-120">&#x003C;tag&#x003E; ...</span>
<span 
class="pcrr7t-x-x-120">&#x003C;/tag&#x003E;</span>
. The top-level tag of the vocabulary is the <span 
class="pcrr7t-x-x-120">&#x003C;particleset&#x003E;</span>
, and individual particle attributes are represented by <span 
class="pcrr7t-x-x-120">&#x003C;particle&#x003E;</span>
tags.
      <ul class="itemize1">
      <li class="itemize"><span 
class="pcrr7t-x-x-120">particleset</span>
           <ul class="itemize2">
           <li class="itemize"><span 
class="pcrr7t-x-x-120">particle</span>
               <ul class="itemize3">
               <li class="itemize"><span 
class="pcrr7t-x-x-120">sphere</span>
               </li>
               <li class="itemize"><span 
class="pcrr7t-x-x-120">cylinder</span>
               </li>
               <li class="itemize"><span 
class="pcrr7t-x-x-120">cone</span>

               </li>
               <li class="itemize"><span 
class="pcrr7t-x-x-120">cap</span>
               </li>
               <li class="itemize"><span 
class="pcrr7t-x-x-120">plate</span>
               </li>
               <li class="itemize"><span 
class="pcrr7t-x-x-120">line</span>
               </li>
               <li class="itemize"><span 
class="pcrr7t-x-x-120">file</span>
               </li>
               <li class="itemize"><span 
class="pcrr7t-x-x-120">objfile</span>
               </li>
               <li class="itemize"><span 
class="pcrr7t-x-x-120">flipsurface</span>
               </li></ul>
           </li>
           <li class="itemize"><span 
class="pcrr7t-x-x-120">static</span>
               <ul class="itemize3">
               <li class="itemize">(same as particle)</li></ul>
           </li>
           <li class="itemize"><span 
class="pcrr7t-x-x-120">scene</span>
           </li></ul>
      </li></ul>
<!--l. 63--><p class="indent" >   The hierarchy of tags is structured as shown above. The the top level tag contains a number of particle
tags that enclose a series of geometric primitives. Each particle has various attributes that can be passed in
to modify its appearance. Each primitive can be transformed in the local object space of the particle. At
load time, the XML parser will process each particle, generate OpenGL commands to render the
specified geometry, and assign the representation to the appropriate particle. The position and
orientation of the loaded particle data is used as the origin and orientation of the specified
geometry.
<!--l. 70--><p class="indent" >   The mapping from XML to the statefile is as shown in Table <a 
href="#x1-20011">1<!--tex4ht:ref: tab:xmllayout --></a>. The correspondence from particle tags
to statefile ID numbers is either one-to-one or one-to-many. Each new <span 
class="pcrr7t-x-x-120">&#x003C;particle&#x003E;</span>
is mapped onto a loaded statefile in-order. The last particle description in the file automatically applies to
all remaining statefile ID&#8217;s. Thus, if only one <span 
class="pcrr7t-x-x-120">&#x003C;particle&#x003E;</span>
tag is present, it applies to the entire set of particles. The &#8220;count&#8221; attribute may also create a one-to-many
map to particle IDs.

   <div class="table">

<!--l. 73--><p class="indent" >   <a 
 id="x1-20011"></a><hr class="float"><div class="float" 
><table class="float"><tr class="float"><td class="float" 
>

<br /> <table class="caption" 
><tr style="vertical-align:baseline;" class="caption"><td class="id">Table&#x00A0;1: </td><td  
class="content">The general layout of an XML geometry descriptor and its relation to the statefile.</td></tr></table><!--tex4ht:label?: x1-20011 -->
<div class="tabular"><table class="tabular" 
cellspacing="0" cellpadding="0"  
><colgroup id="TBL-2-1g"><col 
id="TBL-2-1"><col 
id="TBL-2-2"><col 
id="TBL-2-3"></colgroup><tr 
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-2-1-"><td  style="white-space:nowrap; text-align:left;" id="TBL-2-1-1"  
class="td11"><span 
class="pcrr7t-x-x-120">&#x003C;particleset&#x003E;         </span></td><td  style="white-space:nowrap; text-align:center;" id="TBL-2-1-2"  
class="td11">  </td><td  style="white-space:nowrap; text-align:left;" id="TBL-2-1-3"  
class="td11">* time                                            </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-2-2-"><td  style="white-space:nowrap; text-align:left;" id="TBL-2-2-1"  
class="td11"> <span 
class="pcrr7t-x-x-120">&#x003C;particle&#x003E;&#x003C;/particle&#x003E;</span></td><td  style="white-space:nowrap; text-align:center;" id="TBL-2-2-2"  
class="td11"><span 
class="cmsy-10x-x-120">&#x2192;</span></td><td  style="white-space:nowrap; text-align:left;" id="TBL-2-2-3"  
class="td11"><span 
class="cmmi-12">x y z  q</span><sub><span 
class="cmr-8">0</span></sub> <span 
class="cmmi-12">q</span><sub><span 
class="cmr-8">1</span></sub> <span 
class="cmmi-12">q</span><sub><span 
class="cmr-8">2</span></sub> <span 
class="cmmi-12">q</span><sub><span 
class="cmr-8">3</span></sub> ... (particle 0)    </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-2-3-"><td  style="white-space:nowrap; text-align:left;" id="TBL-2-3-1"  
class="td11"> <span 
class="pcrr7t-x-x-120">&#x003C;particle&#x003E;&#x003C;/particle&#x003E;</span></td><td  style="white-space:nowrap; text-align:center;" id="TBL-2-3-2"  
class="td11"><span 
class="cmsy-10x-x-120">&#x2192;</span></td><td  style="white-space:nowrap; text-align:left;" id="TBL-2-3-3"  
class="td11"><span 
class="cmmi-12">x y z  q</span><sub><span 
class="cmr-8">0</span></sub> <span 
class="cmmi-12">q</span><sub><span 
class="cmr-8">1</span></sub> <span 
class="cmmi-12">q</span><sub><span 
class="cmr-8">2</span></sub> <span 
class="cmmi-12">q</span><sub><span 
class="cmr-8">3</span></sub> ... (particle 1)    </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-2-4-"><td  style="white-space:nowrap; text-align:left;" id="TBL-2-4-1"  
class="td11"> <span 
class="pcrr7t-x-x-120">&#x003C;particle&#x003E;&#x003C;/particle&#x003E;</span></td><td  style="white-space:nowrap; text-align:center;" id="TBL-2-4-2"  
class="td11"><span 
class="cmsy-10x-x-120">&#x2192;</span></td><td  style="white-space:nowrap; text-align:left;" id="TBL-2-4-3"  
class="td11"><span 
class="cmmi-12">x y z  q</span><sub><span 
class="cmr-8">0</span></sub> <span 
class="cmmi-12">q</span><sub><span 
class="cmr-8">1</span></sub> <span 
class="cmmi-12">q</span><sub><span 
class="cmr-8">2</span></sub> <span 
class="cmmi-12">q</span><sub><span 
class="cmr-8">3</span></sub> ... (particle 2)    </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-2-5-"><td  style="white-space:nowrap; text-align:left;" id="TBL-2-5-1"  
class="td11">                      </td><td  style="white-space:nowrap; text-align:center;" id="TBL-2-5-2"  
class="td11"><span 
class="cmsy-10x-x-120">&#x2198;</span></td><td  style="white-space:nowrap; text-align:left;" id="TBL-2-5-3"  
class="td11"><img 
src="pics/XMLDescriptors0x.png" alt="..."  class="vdots" >                                                     </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-2-6-"><td  style="white-space:nowrap; text-align:left;" id="TBL-2-6-1"  
class="td11">                      </td><td  style="white-space:nowrap; text-align:center;" id="TBL-2-6-2"  
class="td11">  </td><td  style="white-space:nowrap; text-align:left;" id="TBL-2-6-3"  
class="td11"><span 
class="cmmi-12">x y z  q</span><sub><span 
class="cmr-8">0</span></sub> <span 
class="cmmi-12">q</span><sub><span 
class="cmr-8">1</span></sub> <span 
class="cmmi-12">q</span><sub><span 
class="cmr-8">2</span></sub> <span 
class="cmmi-12">q</span><sub><span 
class="cmr-8">3</span></sub> ... (last particle)</td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-2-7-"><td  style="white-space:nowrap; text-align:left;" id="TBL-2-7-1"  
class="td11"><span 
class="pcrr7t-x-x-120">&#x003C;/particleset&#x003E;        </span></td><td  style="white-space:nowrap; text-align:center;" id="TBL-2-7-2"  
class="td11">  </td><td  style="white-space:nowrap; text-align:left;" id="TBL-2-7-3"  
class="td11">                       </td>
</tr><tr 
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-2-8-"><td  style="white-space:nowrap; text-align:left;" id="TBL-2-8-1"  
class="td11">                      </td>
</tr></table></div>

   </td></tr></table></div><hr class="endfloat" />
   </div>
   <h4 class="subsectionHead"><span class="titlemark">1.1    </span> <a 
 id="x1-30001.1"></a>Particle Attributes</h4>
<!--l. 92--><p class="noindent" >A set of optional attributes may be inserted into the enclosing braces of any particle tag. This insertion
takes the form <span 
class="pcrr7t-x-x-120">&#x003C;particle [tag1="data"] [tag2="data"] ... &#x003E;</span>
for an arbitrary number of attribute tags. The attributes and their effects are listed in Table <a 
href="#x1-30012">2<!--tex4ht:ref: tab:att --></a>. For example,
an XML particle tag might take the form:
<!--l. 95--><p class="indent" >   <span 
class="pcrr7t-x-x-120">&#x003C;particle notransparent="false" inverted="true" r="0" g="1" b="0"&#x003E;</span>
<!--l. 97--><p class="indent" >   This tag specifies a particle that is green, always opaque, and &#8220;inverted&#8221; for a cutaway view on its
interior. Note that the attributes are enclosed in double quotes (single quotes are also permissible). The
data-types of integer and float map real numbers to parameters. The boolean type maps the strings &#8220;true&#8221;
or &#8220;false&#8221; to a logical state.
<!--l. 99--><p class="indent" >   Of particular note is the &#8220;count&#8221; attribute, which affects the mapping of descriptors to statefile ID&#8217;s.
Thus a particle tag of the form <span 
class="pcrr7t-x-x-120">&#x003C;particle count="5000"&#x003E;</span>
will map the same specified geometry to the next 5000 lines of statefile input. Table <a 
href="#x1-30023">3<!--tex4ht:ref: tab:xmlmapping --></a> portrays an example
use of the count attribute. Since particle states are commonly grouped by type, this attribute
allows the compact specification of several particle categories that correspond to the input
file.
   <div class="table">

<!--l. 101--><p class="indent" >   <a 
 id="x1-30012"></a><hr class="float"><div class="float" 
><table class="float"><tr class="float"><td class="float" 
>

<br /> <table class="caption" 
><tr style="vertical-align:baseline;" class="caption"><td class="id">Table&#x00A0;2: </td><td  
class="content">Particle attributes and their effects.</td></tr></table><!--tex4ht:label?: x1-30012 -->
<div class="center" 
>
<!--l. 104--><p class="noindent" >
<div class="tabular"><table class="tabular" 
cellspacing="0" cellpadding="0" rules="groups" 
><colgroup id="TBL-3-1g"><col 
id="TBL-3-1"></colgroup><colgroup id="TBL-3-2g"><col 
id="TBL-3-2"></colgroup><colgroup id="TBL-3-3g"><col 
id="TBL-3-3"></colgroup><tr  
 style="vertical-align:baseline;" id="TBL-3-1-"><td  style="white-space:nowrap; text-align:left;" id="TBL-3-1-1"  
class="td11"><span 
class="ptmr7t-">Attribute ID  </span></td><td  style="white-space:nowrap; text-align:center;" id="TBL-3-1-2"  
class="td11"> <span 
class="ptmr7t-">Type  </span></td><td  style="white-space:nowrap; text-align:left;" id="TBL-3-1-3"  
class="td11"><span 
class="ptmr7t-">Effects                                                                                                 </span></td>
</tr><tr 
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr 
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-3-2-"><td  style="white-space:nowrap; text-align:left;" id="TBL-3-2-1"  
class="td11"><span 
class="ptmr7t-">count             </span></td><td  style="white-space:nowrap; text-align:center;" id="TBL-3-2-2"  
class="td11"> <span 
class="ptmr7t-">integer </span></td><td  style="white-space:nowrap; text-align:left;" id="TBL-3-2-3"  
class="td11"><span 
class="ptmr7t-">Changes the multiplicity of the particle.                                            </span></td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-3-3-"><td  style="white-space:nowrap; text-align:left;" id="TBL-3-3-1"  
class="td11"><span 
class="ptmr7t-">quality           </span></td><td  style="white-space:nowrap; text-align:center;" id="TBL-3-3-2"  
class="td11"> <span 
class="ptmr7t-">integer </span></td><td  style="white-space:nowrap; text-align:left;" id="TBL-3-3-3"  
class="td11"><span 
class="ptmr7t-">Increases the quality (triangle count) of particle geometry.               </span></td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-3-4-"><td  style="white-space:nowrap; text-align:left;" id="TBL-3-4-1"  
class="td11"><span 
class="ptmr7t-">notransparent</span></td><td  style="white-space:nowrap; text-align:center;" id="TBL-3-4-2"  
class="td11"><span 
class="ptmr7t-">boolean</span></td><td  style="white-space:nowrap; text-align:left;" id="TBL-3-4-3"  
class="td11"><span 
class="ptmr7t-">When true, prevents particle from being drawn transparently.           </span></td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-3-5-"><td  style="white-space:nowrap; text-align:left;" id="TBL-3-5-1"  
class="td11"><span 
class="ptmr7t-">inverted         </span></td><td  style="white-space:nowrap; text-align:center;" id="TBL-3-5-2"  
class="td11"><span 
class="ptmr7t-">boolean</span></td><td  style="white-space:nowrap; text-align:left;" id="TBL-3-5-3"  
class="td11"><span 
class="ptmr7t-">Causes the particle to be rendered &#8220;inside-out,&#8221; with reversed faces.</span></td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-3-6-"><td  style="white-space:nowrap; text-align:left;" id="TBL-3-6-1"  
class="td11"><span 
class="ptmr7t-">textures         </span></td><td  style="white-space:nowrap; text-align:center;" id="TBL-3-6-2"  
class="td11"><span 
class="ptmr7t-">boolean</span></td><td  style="white-space:nowrap; text-align:left;" id="TBL-3-6-3"  
class="td11"><span 
class="ptmr7t-">If false, prevents textures from being enabled on this particle.          </span></td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-3-7-"><td  style="white-space:nowrap; text-align:left;" id="TBL-3-7-1"  
class="td11"><span 
class="ptmr7t-">r                    </span></td><td  style="white-space:nowrap; text-align:center;" id="TBL-3-7-2"  
class="td11"> <span 
class="ptmr7t-">float   </span></td><td  style="white-space:nowrap; text-align:left;" id="TBL-3-7-3"  
class="td11"><span 
class="ptmr7t-">Overrides particle color, red channel, range [0, 1].                            </span></td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-3-8-"><td  style="white-space:nowrap; text-align:left;" id="TBL-3-8-1"  
class="td11"><span 
class="ptmr7t-">g                    </span></td><td  style="white-space:nowrap; text-align:center;" id="TBL-3-8-2"  
class="td11"> <span 
class="ptmr7t-">float   </span></td><td  style="white-space:nowrap; text-align:left;" id="TBL-3-8-3"  
class="td11"><span 
class="ptmr7t-">Overrides particle color, green channel, range [0, 1].                        </span></td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-3-9-"><td  style="white-space:nowrap; text-align:left;" id="TBL-3-9-1"  
class="td11"><span 
class="ptmr7t-">b                    </span></td><td  style="white-space:nowrap; text-align:center;" id="TBL-3-9-2"  
class="td11"> <span 
class="ptmr7t-">float   </span></td><td  style="white-space:nowrap; text-align:left;" id="TBL-3-9-3"  
class="td11"><span 
class="ptmr7t-">Overrides particle color, blue channel, range [0, 1].                          </span></td>
</tr><tr 
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-3-10-"><td  style="white-space:nowrap; text-align:left;" id="TBL-3-10-1"  
class="td11">         </td>
</tr></table></div>
</div>

   </td></tr></table></div><hr class="endfloat" />
   </div>
   <div class="table">

<!--l. 123--><p class="indent" >   <a 
 id="x1-30023"></a><hr class="float"><div class="float" 
><table class="float"><tr class="float"><td class="float" 
>

<br /> <table class="caption" 
><tr style="vertical-align:baseline;" class="caption"><td class="id">Table&#x00A0;3: </td><td  
class="content">Mapping particle tags to state using the &#8220;count&#8221; attribute.</td></tr></table><!--tex4ht:label?: x1-30023 -->
<div class="center" 
>
<!--l. 126--><p class="noindent" >
<div class="tabular"><table class="tabular" 
cellspacing="0" cellpadding="0"  
><colgroup id="TBL-4-1g"><col 
id="TBL-4-1"><col 
id="TBL-4-2"><col 
id="TBL-4-3"></colgroup><tr 
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-4-1-"><td  style="white-space:nowrap; text-align:left;" id="TBL-4-1-1"  
class="td11"><span 
class="pcrr7t-x-x-120">&#x003C;particleset&#x003E;                   </span></td><td  style="white-space:nowrap; text-align:center;" id="TBL-4-1-2"  
class="td11">  </td><td  style="white-space:nowrap; text-align:left;" id="TBL-4-1-3"  
class="td11">* time                                            </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-4-2-"><td  style="white-space:nowrap; text-align:left;" id="TBL-4-2-1"  
class="td11"> <span 
class="pcrr7t-x-x-120">&#x003C;particle count="3"&#x003E;&#x003C;/particle&#x003E;</span></td><td  style="white-space:nowrap; text-align:center;" id="TBL-4-2-2"  
class="td11"><span 
class="cmsy-10x-x-120">&#x2192;</span></td><td  style="white-space:nowrap; text-align:left;" id="TBL-4-2-3"  
class="td11"><span 
class="cmmi-12">x y z  q</span><sub><span 
class="cmr-8">0</span></sub> <span 
class="cmmi-12">q</span><sub><span 
class="cmr-8">1</span></sub> <span 
class="cmmi-12">q</span><sub><span 
class="cmr-8">2</span></sub> <span 
class="cmmi-12">q</span><sub><span 
class="cmr-8">3</span></sub> ... (particle 0)    </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-4-3-"><td  style="white-space:nowrap; text-align:left;" id="TBL-4-3-1"  
class="td11">                                </td><td  style="white-space:nowrap; text-align:center;" id="TBL-4-3-2"  
class="td11"><span 
class="cmsy-10x-x-120">&#x2198;</span></td><td  style="white-space:nowrap; text-align:left;" id="TBL-4-3-3"  
class="td11"><span 
class="cmmi-12">x y z  q</span><sub><span 
class="cmr-8">0</span></sub> <span 
class="cmmi-12">q</span><sub><span 
class="cmr-8">1</span></sub> <span 
class="cmmi-12">q</span><sub><span 
class="cmr-8">2</span></sub> <span 
class="cmmi-12">q</span><sub><span 
class="cmr-8">3</span></sub> ... (particle 1)    </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-4-4-"><td  style="white-space:nowrap; text-align:left;" id="TBL-4-4-1"  
class="td11">                                </td><td  style="white-space:nowrap; text-align:center;" id="TBL-4-4-2"  
class="td11">  </td><td  style="white-space:nowrap; text-align:left;" id="TBL-4-4-3"  
class="td11"><span 
class="cmmi-12">x y z  q</span><sub><span 
class="cmr-8">0</span></sub> <span 
class="cmmi-12">q</span><sub><span 
class="cmr-8">1</span></sub> <span 
class="cmmi-12">q</span><sub><span 
class="cmr-8">2</span></sub> <span 
class="cmmi-12">q</span><sub><span 
class="cmr-8">3</span></sub> ... (particle 2)    </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-4-5-"><td  style="white-space:nowrap; text-align:right;" id="TBL-4-5-1"  
class="td11"><div class="multicolumn"  style="white-space:nowrap; text-align:right;"> <span 
class="pcrr7t-x-x-120">&#x003C;particle&#x003E;&#x003C;/particle&#x003E;          </span></div></td><td  style="white-space:nowrap; text-align:center;" id="TBL-4-5-2"  
class="td11"><span 
class="cmsy-10x-x-120">&#x2192;</span></td><td  style="white-space:nowrap; text-align:left;" id="TBL-4-5-3"  
class="td11"><span 
class="cmmi-12">x y z  q</span><sub><span 
class="cmr-8">0</span></sub> <span 
class="cmmi-12">q</span><sub><span 
class="cmr-8">1</span></sub> <span 
class="cmmi-12">q</span><sub><span 
class="cmr-8">2</span></sub> <span 
class="cmmi-12">q</span><sub><span 
class="cmr-8">3</span></sub> ... (particle 3)    </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-4-6-"><td  style="white-space:nowrap; text-align:left;" id="TBL-4-6-1"  
class="td11">                                </td><td  style="white-space:nowrap; text-align:center;" id="TBL-4-6-2"  
class="td11"><span 
class="cmsy-10x-x-120">&#x2198;</span></td><td  style="white-space:nowrap; text-align:left;" id="TBL-4-6-3"  
class="td11"><img 
src="pics/XMLDescriptors1x.png" alt="..."  class="vdots" >                                                     </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-4-7-"><td  style="white-space:nowrap; text-align:left;" id="TBL-4-7-1"  
class="td11">                                </td><td  style="white-space:nowrap; text-align:center;" id="TBL-4-7-2"  
class="td11">  </td><td  style="white-space:nowrap; text-align:left;" id="TBL-4-7-3"  
class="td11"><span 
class="cmmi-12">x y z  q</span><sub><span 
class="cmr-8">0</span></sub> <span 
class="cmmi-12">q</span><sub><span 
class="cmr-8">1</span></sub> <span 
class="cmmi-12">q</span><sub><span 
class="cmr-8">2</span></sub> <span 
class="cmmi-12">q</span><sub><span 
class="cmr-8">3</span></sub> ... (last particle)</td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-4-8-"><td  style="white-space:nowrap; text-align:left;" id="TBL-4-8-1"  
class="td11"><span 
class="pcrr7t-x-x-120">&#x003C;/particleset&#x003E;                  </span></td><td  style="white-space:nowrap; text-align:center;" id="TBL-4-8-2"  
class="td11">  </td><td  style="white-space:nowrap; text-align:left;" id="TBL-4-8-3"  
class="td11">                       </td>
</tr><tr 
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-4-9-"><td  style="white-space:nowrap; text-align:left;" id="TBL-4-9-1"  
class="td11">                                </td>
</tr></table></div></div>

   </td></tr></table></div><hr class="endfloat" />
   </div>
   <h3 class="sectionHead"><span class="titlemark">2    </span> <a 
 id="x1-40002"></a>Primitives</h3>
<!--l. 144--><p class="noindent" >A number of geometric primitives are available for use in specifying particle shape. The objects are
spheres, spherical caps, cylinders, cones, points, lines, and quadrilaterals (plates). A set of these primitives
is issued within each particle tag to describe its appearance. Each primitive has a variety of parameters
that determine its size and shape, and each primitive may be transformed with regard to position and
orientation. Two secondary primitive tags, <span 
class="pcrr7t-x-x-120">file</span>
and <span 
class="pcrr7t-x-x-120">objfile</span>
, allow file input to be used for particle geometry.
<!--l. 149--><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">2.1    </span> <a 
 id="x1-50002.1"></a>Transformation Tags</h4>
<!--l. 151--><p class="noindent" >Within any primitive, it is possible to specify an affine transformation involving a rotation followed by a
translation. This operation will transform the unit geometry into the object space of the particle. The tags
that perform this transformation are <span 
class="pcrr7t-x-x-120">&#x003C;position&#x003E;</span>
and <span 
class="pcrr7t-x-x-120">&#x003C;orientation&#x003E;</span>
. The position tag accepts an x/y/z input, in the form &#8220;<span 
class="pcrr7t-x-x-120">&#x003C;position&#x003E; &#x003C;x&#x003E;x-pos&#x003C;/x&#x003E; &#x003C;y&#x003E;y-pos&#x003C;/y&#x003E;</span>
<span 
class="pcrr7t-x-x-120">&#x003C;z&#x003E;z-pos&#x003C;/z&#x003E;&#x003C;/position&#x003E;</span>
.&#8221; The orientation tag accepts input in two forms: that of Euler angles, using eta/xi/lamdba,
or as a quaternion, specified in the form <span 
class="cmmi-12">q</span><sub><span 
class="cmr-8">0</span></sub> <span 
class="cmmi-12">q</span><sub><span 
class="cmr-8">1</span></sub> <span 
class="cmmi-12">q</span><sub><span 
class="cmr-8">2</span></sub> <span 
class="cmmi-12">q</span><sub><span 
class="cmr-8">3</span></sub>. The format with Euler angles uses the
<span 
class="pcrr7t-x-x-120">&#x003C;eta&#x003E;</span>
, <span 
class="pcrr7t-x-x-120">&#x003C;xi&#x003E;</span>
, and <span 
class="pcrr7t-x-x-120">&#x003C;lambda&#x003E;</span>
tags. The Euler angles are given in radians, and denote a series of rotations: first around the X axis, then
around Y, and then around Z. The quaternion orientation format uses the <span 
class="pcrr7t-x-x-120">&#x003C;q0&#x003E;</span>
, <span 
class="pcrr7t-x-x-120">&#x003C;q1&#x003E;</span>
, <span 
class="pcrr7t-x-x-120">&#x003C;q2&#x003E;</span>
, and <span 
class="pcrr7t-x-x-120">&#x003C;q3&#x003E;</span>
tags. Both orientation types are portrayed in Table <a 
href="#x1-50014">4<!--tex4ht:ref: tab:orientation --></a>. By applying these transformations to the primitive
tags, an arbitrary arrangement of shapes may be specified.
   <div class="table">

<!--l. 160--><p class="indent" >   <a 
 id="x1-50014"></a><hr class="float"><div class="float" 
><table class="float"><tr class="float"><td class="float" 
>

<br /> <table class="caption" 
><tr style="vertical-align:baseline;" class="caption"><td class="id">Table&#x00A0;4: </td><td  
class="content">Orientation tags using Euler angles and quaternions.</td></tr></table><!--tex4ht:label?: x1-50014 -->

<table 
class="verbatim"><tr class="verbatim"><td 
class="verbatim"><div class="verbatim">
&#x003C;particle&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;...
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x003C;orientation&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;eta&#x003E;eta-angle&#x003C;/eta&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;xi&#x003E;xi-angle&#x003C;/xi&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;lamdba&#x003E;lambda-angle&#x003C;/lambda&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x003C;/orientation&#x003E;
&#x00A0;<br />&#x003C;/particle&#x003E;
&#x00A0;<br />
&#x00A0;<br />&#x003C;particle&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;...
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x003C;orientation&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;q0&#x003E;w-val&#x003C;/q0&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;q1&#x003E;x-val&#x003C;/q1&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;q2&#x003E;y-val&#x003C;/q2&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;q3&#x003E;z-val&#x003C;/q3&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x003C;/orientation&#x003E;
&#x00A0;<br />&#x003C;particle&#x003E;
</div>
</td></tr></table>
<!--l. 181--><p class="nopar" >

   </td></tr></table></div><hr class="endfloat" />
   </div>
   <h4 class="subsectionHead"><span class="titlemark">2.2    </span> <a 
 id="x1-60002.2"></a>Primitive Types</h4>
<!--l. 186--><p class="noindent" >
   <h5 class="subsubsectionHead"><span class="titlemark">2.2.1    </span> <a 
 id="x1-70002.2.1"></a>Sphere</h5>
<!--l. 187--><p class="noindent" ><hr class="figure"><div class="figure" 
><table class="figure"><tr class="figure"><td class="figure" 
>

<a 
 id="x1-70011"></a>

<div class="center" 
>
<!--l. 188--><p class="noindent" >

<!--l. 189--><p class="noindent" ><img 
src="pics/spheres.png" alt="PIC"  
></div>
<!--l. 191--><p class="noindent" >&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;                                                 <span 
class="pcrr7t-x-x-120">&#x003C;sphere&#x003E;</span>
<br class="newline" />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;                                                      <span 
class="pcrr7t-x-x-120">&#x003C;radius&#x003E;1.0&#x003C;/radius&#x003E;</span>
<br class="newline" />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;                                                 <span 
class="pcrr7t-x-x-120">&#x003C;/sphere&#x003E;</span>
<br /> <table class="caption" 
><tr style="vertical-align:baseline;" class="caption"><td class="id">Figure&#x00A0;1: </td><td  
class="content">An untextured and textured sphere primitive and example descriptor.</td></tr></table><!--tex4ht:label?: x1-70011 -->

<!--l. 196--><p class="noindent" ></td></tr></table></div><hr class="endfigure">
<!--l. 197--><p class="indent" >   The simplest primitive is the sphere, shown in Figure <a 
href="#x1-70011">1<!--tex4ht:ref: fig:SpherePrimitive --></a>. It has only a single parameter:
<span 
class="pcrr7t-x-x-120">&#x003C;radius&#x003E;</span>
. By using the <span 
class="pcrr7t-x-x-120">&#x003C;position&#x003E;</span>
tag the sphere can be centered anywhere in the object space. Rotation tags have no effect on the generated
sphere geometry. If a radius of 0 is specified, a point will be rendered instead of a polygonal sphere. A
&#8216;pure&#8217; sphere primitive (alone within a <span 
class="pcrr7t-x-x-120">&#x003C;particle&#x003E;</span>
) is able to be rendered using programmable shaders, which provide enhancements to performance and
visual fidelity.
   <h5 class="subsubsectionHead"><span class="titlemark">2.2.2    </span> <a 
 id="x1-80002.2.2"></a>Cap</h5>
<!--l. 203--><p class="noindent" >The cap, shown in Figure <a 
href="#x1-80012">2<!--tex4ht:ref: fig:CapPrimitive --></a>, specifies a parameterized spherical cap that lies somewhere between a
flat disc and a hemisphere. The parameters for the cap, which lies on the XY plane, are the
<span 
class="pcrr7t-x-x-120">&#x003C;radius&#x003E;</span>
and <span 
class="pcrr7t-x-x-120">&#x003C;height&#x003E;</span>
. The <span 
class="pcrr7t-x-x-120">&#x003C;radius&#x003E;</span>
is the radius of the outer edge of the cap, and the <span 
class="pcrr7t-x-x-120">&#x003C;height&#x003E;</span>
is the &#8216;thickness&#8217; of the cap, or the distance from the origin to the highest point on the spherical cap,
<span 
class="cmr-12">(0</span><span 
class="cmmi-12">, </span><span 
class="cmr-12">0</span><span 
class="cmmi-12">,height</span><span 
class="cmr-12">)</span>. When <span 
class="pcrr7t-x-x-120">&#x003C;height&#x003E;</span>
=0 the geometry becomes a disc. When <span 
class="pcrr7t-x-x-120">&#x003C;height&#x003E;</span>
is positive the cap becomes a truncated sphere, where the radius of curvature of the cap is
<img 
src="pics/XMLDescriptors2x.png" alt="radius2+height2
----2&#x22C5;height---"  class="frac" align="middle">. When <span 
class="cmmi-12">height &#x003E; radius </span>no valid spherical cap exists and the cap geometry is undefined.
<hr class="figure"><div class="figure" 
><table class="figure"><tr class="figure"><td class="figure" 
>

<a 
 id="x1-80012"></a>

<div class="center" 
>
<!--l. 208--><p class="noindent" >

<!--l. 209--><p class="noindent" ><img 
src="pics/cap.png" alt="PIC"  
><br />
<img 
src="pics/cap-measure.png" alt="PIC"  
><br />
</div>
<!--l. 212--><p class="noindent" >&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;                                                 <span 
class="pcrr7t-x-x-120">&#x003C;cap&#x003E;</span>
<br class="newline" />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;                                                      <span 
class="pcrr7t-x-x-120">&#x003C;radius&#x003E;1.0&#x003C;/radius&#x003E;</span>
<br class="newline" />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;                                                      <span 
class="pcrr7t-x-x-120">&#x003C;height&#x003E;0.2&#x003C;/height&#x003E;</span>
<br class="newline" />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;                                                 <span 
class="pcrr7t-x-x-120">&#x003C;/cap&#x003E;</span>
<br /> <table class="caption" 
><tr style="vertical-align:baseline;" class="caption"><td class="id">Figure&#x00A0;2: </td><td  
class="content">A textured cap primitive and example descriptor.</td></tr></table><!--tex4ht:label?: x1-80012 -->

<!--l. 219--><p class="indent" >   </td></tr></table></div><hr class="endfigure">
   <h5 class="subsubsectionHead"><span class="titlemark">2.2.3    </span> <a 
 id="x1-90002.2.3"></a>Cylinder</h5>
<!--l. 222--><p class="noindent" >A cylinder tag specifies a cylindrical surface, shown in Figure <a 
href="#x1-90013">3<!--tex4ht:ref: fig:CylPrimitive --></a>. The tag has two parameters:
<span 
class="pcrr7t-x-x-120">&#x003C;radius&#x003E;</span>
and <span 
class="pcrr7t-x-x-120">&#x003C;length&#x003E;</span>
. The radius corresponds to the radius of the cylinder base, which lies on the object space XY plane. The
length corresponds to the height of the cylinder in the Z direction. This cylinder is centered on the origin,
extending out equally along the Z axis in both directions. <hr class="figure"><div class="figure" 
><table class="figure"><tr class="figure"><td class="figure" 
>

<a 
 id="x1-90013"></a>

<div class="center" 
>
<!--l. 227--><p class="noindent" >

<!--l. 228--><p class="noindent" ><img 
src="pics/cylinder.png" alt="PIC"  
><br />
<img 
src="pics/cyl-measure.png" alt="PIC"  
><br />
</div>
<!--l. 231--><p class="noindent" >&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;                                                 <span 
class="pcrr7t-x-x-120">&#x003C;cylinder&#x003E;</span>
<br class="newline" />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;                                                      <span 
class="pcrr7t-x-x-120">&#x003C;radius&#x003E;1.0&#x003C;/radius&#x003E;</span>
<br class="newline" />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;                                                      <span 
class="pcrr7t-x-x-120">&#x003C;length&#x003E;2.0&#x003C;/length&#x003E;</span>
<br class="newline" />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;                                                 <span 
class="pcrr7t-x-x-120">&#x003C;/cylinder&#x003E;</span>
<br /> <table class="caption" 
><tr style="vertical-align:baseline;" class="caption"><td class="id">Figure&#x00A0;3: </td><td  
class="content">A cylinder primitive and example descriptor.</td></tr></table><!--tex4ht:label?: x1-90013 -->

<!--l. 239--><p class="indent" >   </td></tr></table></div><hr class="endfigure">
   <h5 class="subsubsectionHead"><span class="titlemark">2.2.4    </span> <a 
 id="x1-100002.2.4"></a>Cone</h5>
<!--l. 244--><p class="noindent" >A cone takes three parameters: a <span 
class="pcrr7t-x-x-120">&#x003C;small</span><span 
class="pcrr7t-x-x-120">_radius&#x003E;</span>
, a <span 
class="pcrr7t-x-x-120">&#x003C;large</span><span 
class="pcrr7t-x-x-120">_radius&#x003E;</span>
, and a <span 
class="pcrr7t-x-x-120">&#x003C;half</span><span 
class="pcrr7t-x-x-120">_angle&#x003E;</span>
. A cone tag can represent a regular cone, a truncated cone, but not a cylinder (the two radii must not be
equal). If small_radius = 0, the apex of the cone always lies directly on the object space origin, and the
axis extends along the position Z direction. A cone with a small radius of zero is shown in Figure <a 
href="#x1-100014">4<!--tex4ht:ref: fig:ConeIso --></a>. The
two radius tags correspond to the radii of the smaller (small_radius) and larger (large_radius) conical
bases, which both lie on the XY plane. The half_angle tag specifies the angle formed between the top
edge of the cone and the Z axis. A regular cone that tapers to a point is generated when the
<span 
class="pcrr7t-x-x-120">&#x003C;small</span><span 
class="pcrr7t-x-x-120">_radius&#x003E;</span>
is specified as 0. A truncated cone is generated whenever <span 
class="pcrr7t-x-x-120">&#x003C;small</span><span 
class="pcrr7t-x-x-120">_radius&#x003E;</span>
is greater than 0. In both cases the half angle of the cone combined with the large radius always
determines the &#8216;height&#8217; of the cone. If the half angle and large radius remain the same, the effect of
increasing the small radius will be to truncate the upper portion of the cone, shown in Figure <a 
href="#x1-100025">5<!--tex4ht:ref: fig:ConeSmall --></a>. The axial
position of the cone&#8217;s larger base is thus <span 
class="cmr-12">(0</span><span 
class="cmmi-12">, </span><span 
class="cmr-12">0</span><span 
class="cmmi-12">,</span><img 
src="pics/XMLDescriptors3x.png" alt="talanr(ghexalrfaxdainugsle)"  class="frac" align="middle"><span 
class="cmr-12">) </span>and the axial position of the smaller base is
<span 
class="cmr-12">(0</span><span 
class="cmmi-12">, </span><span 
class="cmr-12">0</span><span 
class="cmmi-12">,</span><img 
src="pics/XMLDescriptors4x.png" alt="-smallxradius-
tan(halfxangle)"  class="frac" align="middle"><span 
class="cmr-12">)</span>.
<!--l. 255--><p class="indent" >   <hr class="figure"><div class="figure" 
><table class="figure"><tr class="figure"><td class="figure" 
>

<a 
 id="x1-100014"></a>

<div class="center" 
>
<!--l. 256--><p class="noindent" >

<!--l. 257--><p class="noindent" ><img 
src="pics/coneiso.png" alt="PIC"  
></div>
<!--l. 259--><p class="noindent" >&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;                                                 <span 
class="pcrr7t-x-x-120">&#x003C;cone&#x003E;</span>
<br class="newline" />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;                                                      <span 
class="pcrr7t-x-x-120">&#x003C;small</span><span 
class="pcrr7t-x-x-120">_radius&#x003E;0.0&#x003C;/small</span><span 
class="pcrr7t-x-x-120">_radius&#x003E;</span>
<br class="newline" />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;                                                      <span 
class="pcrr7t-x-x-120">&#x003C;large</span><span 
class="pcrr7t-x-x-120">_radius&#x003E;0.1&#x003C;/large</span><span 
class="pcrr7t-x-x-120">_radius&#x003E;</span>
<br class="newline" />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;                                                      <span 
class="pcrr7t-x-x-120">&#x003C;half</span><span 
class="pcrr7t-x-x-120">_angle&#x003E;0.5&#x003C;/half</span><span 
class="pcrr7t-x-x-120">_angle&#x003E;</span>
<br class="newline" />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;                                                 <span 
class="pcrr7t-x-x-120">&#x003C;/cone&#x003E;</span>
<br /> <table class="caption" 
><tr style="vertical-align:baseline;" class="caption"><td class="id">Figure&#x00A0;4: </td><td  
class="content">A cone primitive.</td></tr></table><!--tex4ht:label?: x1-100014 -->

<!--l. 266--><p class="indent" >   </td></tr></table></div><hr class="endfigure">
<!--l. 268--><p class="indent" >   <hr class="figure"><div class="figure" 
><table class="figure"><tr class="figure"><td class="figure" 
>

<a 
 id="x1-100025"></a>

<div class="center" 
>
<!--l. 269--><p class="noindent" >

<!--l. 270--><p class="noindent" ><img 
src="pics/conesmall.png" alt="PIC"  
></div>
<br /> <table class="caption" 
><tr style="vertical-align:baseline;" class="caption"><td class="id">Figure&#x00A0;5: </td><td  
class="content">The effect of increasing the small radius for three otherwise identical cones.</td></tr></table><!--tex4ht:label?: x1-100025 -->

<!--l. 274--><p class="indent" >   </td></tr></table></div><hr class="endfigure">
   <h5 class="subsubsectionHead"><span class="titlemark">2.2.5    </span> <a 
 id="x1-110002.2.5"></a>Plate</h5>
<!--l. 277--><p class="noindent" >A plate is used to specify a quadrilateral. The four parameters are the four corners of the quad, and each
point is given directly in object space. The form is <span 
class="pcrr7t-x-x-120">&#x003C;cornerN&#x003E; &#x003C;x&#x003E;x-val&#x003C;/x&#x003E; &#x003C;y&#x003E;y-val&#x003C;/y&#x003E;</span>
<span 
class="pcrr7t-x-x-120">&#x003C;z&#x003E;z-val&#x003C;/z&#x003E; &#x003C;/cornerN&#x003E;</span>
, for <span 
class="cmmi-12">N </span><span 
class="cmr-12">= 1</span><span 
class="cmmi-12">, </span><span 
class="cmr-12">2</span><span 
class="cmmi-12">, </span><span 
class="cmr-12">3</span><span 
class="cmmi-12">, </span><span 
class="cmr-12">4</span>. While this plate will generally be planar, it is actually rendered as a pair of triangles:
one from the loop <span 
class="cmr-12">1 </span><span 
class="cmsy-10x-x-120">- </span><span 
class="cmr-12">2 </span><span 
class="cmsy-10x-x-120">- </span><span 
class="cmr-12">4</span>, and one from <span 
class="cmr-12">2 </span><span 
class="cmsy-10x-x-120">- </span><span 
class="cmr-12">3 </span><span 
class="cmsy-10x-x-120">- </span><span 
class="cmr-12">4</span>. A series of plates could theoretically be
combined to form any arbitrary geometry, but the file and object-file tags are better suited for this
purpose.
<!--l. 279--><p class="noindent" >
   <h5 class="subsubsectionHead"><span class="titlemark">2.2.6    </span> <a 
 id="x1-120002.2.6"></a>Line</h5>
<!--l. 280--><p class="noindent" >A line adds a single line segment to the particle geometry. This line is specified much like the plate object,
as the parameters are <span 
class="pcrr7t-x-x-120">&#x003C;corner1&#x003E;</span>
and <span 
class="pcrr7t-x-x-120">&#x003C;corner2&#x003E;</span>
, and the XYZ positions are directly used to form the line&#8217;s endpoints in object space.
<!--l. 282--><p class="noindent" >
   <h5 class="subsubsectionHead"><span class="titlemark">2.2.7    </span> <a 
 id="x1-130002.2.7"></a>File</h5>
<!--l. 283--><p class="noindent" >In order to specify an arbitrary geometry, an ASCII text file specifying triangles (in object space) can be
loaded into the geometry engine using the <span 
class="pcrr7t-x-x-120">&#x003C;file&#x003E;</span>
tag. The file specifies a set of points and surface normals, every three of which compose a single
triangle. The normals are specified at each vertex for the purpose of lighting calculations. The
<span 
class="pcrr7t-x-x-120">&#x003C;filename&#x003E;</span>
parameter within the primitive descriptor is a string that points to the triangle file (relative to the
path of the XML file itself). As per usual, transformation tags may be used to displace the
geometry.
<!--l. 292--><p class="indent" >   <hr class="figure"><div class="figure" 
><table class="figure"><tr class="figure"><td class="figure" 
>

<a 
 id="x1-130016"></a>

<div class="center" 
>
<!--l. 293--><p class="noindent" >
<div class="tabular"><table class="tabular" 
cellspacing="0" cellpadding="0"  
><colgroup id="TBL-5-1g"><col 
id="TBL-5-1"><col 
id="TBL-5-2"></colgroup><tr  
 style="vertical-align:baseline;" id="TBL-5-1-"><td  style="white-space:nowrap; text-align:center;" id="TBL-5-1-1"  
class="td11"><!--tex4ht:inline--><div class="tabular"><table class="tabular" 
cellspacing="0" cellpadding="0"  
><colgroup id="TBL-6-1g"><col 
id="TBL-6-1"><col 
id="TBL-6-2"><col 
id="TBL-6-3"><col 
id="TBL-6-4"><col 
id="TBL-6-5"><col 
id="TBL-6-6"></colgroup><tr  
 style="vertical-align:baseline;" id="TBL-6-1-"><td  style="white-space:nowrap; text-align:center;" id="TBL-6-1-1"  
class="td11"><span 
class="cmmi-12">x</span><sub><span 
class="cmr-8">0</span></sub></td><td  style="white-space:nowrap; text-align:center;" id="TBL-6-1-2"  
class="td11"><span 
class="cmmi-12">y</span><sub><span 
class="cmr-8">0</span></sub></td><td  style="white-space:nowrap; text-align:center;" id="TBL-6-1-3"  
class="td11"><span 
class="cmmi-12">z</span><sub><span 
class="cmr-8">0</span></sub></td><td  style="white-space:nowrap; text-align:center;" id="TBL-6-1-4"  
class="td11"><span 
class="cmmi-12">nx</span><sub><span 
class="cmr-8">0</span></sub></td><td  style="white-space:nowrap; text-align:center;" id="TBL-6-1-5"  
class="td11"><span 
class="cmmi-12">ny</span><sub><span 
class="cmr-8">0</span></sub></td><td  style="white-space:nowrap; text-align:center;" id="TBL-6-1-6"  
class="td11"><span 
class="cmmi-12">nz</span><sub><span 
class="cmr-8">0</span></sub></td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-6-2-"><td  style="white-space:nowrap; text-align:center;" id="TBL-6-2-1"  
class="td11"><span 
class="cmmi-12">x</span><sub><span 
class="cmr-8">1</span></sub></td><td  style="white-space:nowrap; text-align:center;" id="TBL-6-2-2"  
class="td11"><span 
class="cmmi-12">y</span><sub><span 
class="cmr-8">1</span></sub></td><td  style="white-space:nowrap; text-align:center;" id="TBL-6-2-3"  
class="td11"><span 
class="cmmi-12">z</span><sub><span 
class="cmr-8">1</span></sub></td><td  style="white-space:nowrap; text-align:center;" id="TBL-6-2-4"  
class="td11"><span 
class="cmmi-12">nx</span><sub><span 
class="cmr-8">1</span></sub></td><td  style="white-space:nowrap; text-align:center;" id="TBL-6-2-5"  
class="td11"><span 
class="cmmi-12">ny</span><sub><span 
class="cmr-8">1</span></sub></td><td  style="white-space:nowrap; text-align:center;" id="TBL-6-2-6"  
class="td11"><span 
class="cmmi-12">nz</span><sub><span 
class="cmr-8">1</span></sub></td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-6-3-"><td  style="white-space:nowrap; text-align:center;" id="TBL-6-3-1"  
class="td11"><span 
class="cmmi-12">x</span><sub><span 
class="cmr-8">2</span></sub></td><td  style="white-space:nowrap; text-align:center;" id="TBL-6-3-2"  
class="td11"><span 
class="cmmi-12">y</span><sub><span 
class="cmr-8">2</span></sub></td><td  style="white-space:nowrap; text-align:center;" id="TBL-6-3-3"  
class="td11"><span 
class="cmmi-12">z</span><sub><span 
class="cmr-8">2</span></sub></td><td  style="white-space:nowrap; text-align:center;" id="TBL-6-3-4"  
class="td11"><span 
class="cmmi-12">nx</span><sub><span 
class="cmr-8">2</span></sub></td><td  style="white-space:nowrap; text-align:center;" id="TBL-6-3-5"  
class="td11"><span 
class="cmmi-12">ny</span><sub><span 
class="cmr-8">2</span></sub></td><td  style="white-space:nowrap; text-align:center;" id="TBL-6-3-6"  
class="td11"><span 
class="cmmi-12">nz</span><sub><span 
class="cmr-8">2</span></sub></td></tr></table>                                                                                                         </div></td><td  style="white-space:nowrap; text-align:center;" id="TBL-5-1-2"  
class="td11"><img 
src="pics/tris.png" alt="PIC"  
></td>
</tr></table>
</div></div>
<br /> <table class="caption" 
><tr style="vertical-align:baseline;" class="caption"><td class="id">Figure&#x00A0;6: </td><td  
class="content">Three lines of a triangle file. This block would form a single triangle with the specified
vertices and surface normals.</td></tr></table><!--tex4ht:label?: x1-130016 -->

<!--l. 304--><p class="indent" >   </td></tr></table></div><hr class="endfigure">
<!--l. 306--><p class="indent" >   The format of triangle files, shown in Figure <a 
href="#x1-130016">6<!--tex4ht:ref: fig:TriangleFile --></a>, is extremely simple. The intent of this design is to
allow an external script to easily generate triangle assemblies: little regard is given to space efficiency.
Each line of the file is composed of six decimal values separated by whitespace. The first three values
specify the location of the vertex in object space, and the next three specify the surface normal at that
point. Every three lines of the ASCII triangle file is parsed into a single triangle in object space. The set of
triangles may be disjoint, and there is no way to specify texture coordinates or colors. The functionality of
the file primitive is largely superseceded by the OBJFile primitive, and use of OBJ files is
recommended.
   <h5 class="subsubsectionHead"><span class="titlemark">2.2.8    </span> <a 
 id="x1-140002.2.8"></a>OBJFile</h5>
<!--l. 310--><p class="noindent" >Like the <span 
class="pcrr7t-x-x-120">&#x003C;file&#x003E;</span>
tag, the <span 
class="pcrr7t-x-x-120">&#x003C;objfile&#x003E;</span>
geometry descriptor inserts an arbitrary collection of triangles into the particle representation. The format
for the objfile, however, is a subset of the Wavefront OBJ file format, which is commonly supported by
CAD packages. The OBJ file parser is only capable of recognizing the simplest OBJ files, which contains
only vertices, normals, and texture coordinates.
<!--l. 313--><p class="indent" >   <hr class="figure"><div class="figure" 
><table class="figure"><tr class="figure"><td class="figure" 
>

<a 
 id="x1-140017"></a>

<div class="center" 
>
<!--l. 314--><p class="noindent" >
<div class="tabular">
<table class="tabular" 
cellspacing="0" cellpadding="0"  
><colgroup id="TBL-7-1g"><col 
id="TBL-7-1"><col 
id="TBL-7-2"></colgroup><tr  
 style="vertical-align:baseline;" id="TBL-7-1-"><td  style="white-space:nowrap; text-align:left;" id="TBL-7-1-1"  
class="td11"><!--tex4ht:inline--><div class="tabular"><table class="tabular" 
cellspacing="0" cellpadding="0"  
><colgroup id="TBL-8-1g"><col 
id="TBL-8-1"></colgroup><tr  
 style="vertical-align:baseline;" id="TBL-8-1-"><td  style="white-space:nowrap; text-align:left;" id="TBL-8-1-1"  
class="td11"><span 
class="pcrr7t-x-x-120">v 1.0 1.0 1.0  </span></td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-8-2-"><td  style="white-space:nowrap; text-align:left;" id="TBL-8-2-1"  
class="td11"><span 
class="pcrr7t-x-x-120">v -1.0 -1.0 1.0</span></td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-8-3-"><td  style="white-space:nowrap; text-align:left;" id="TBL-8-3-1"  
class="td11"><span 
class="pcrr7t-x-x-120">v -1.0 1.0 -1.0</span></td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-8-4-"><td  style="white-space:nowrap; text-align:left;" id="TBL-8-4-1"  
class="td11"><span 
class="pcrr7t-x-x-120">v 1.0 -1.0 -1.0</span></td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-8-5-"><td  style="white-space:nowrap; text-align:left;" id="TBL-8-5-1"  
class="td11"><span 
class="pcrr7t-x-x-120">vn 1.0 1.0 1.0 </span></td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-8-6-"><td  style="white-space:nowrap; text-align:left;" id="TBL-8-6-1"  
class="td11"><span 
class="pcrr7t-x-x-120">vn 0.0 0.0 1.0 </span></td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-8-7-"><td  style="white-space:nowrap; text-align:left;" id="TBL-8-7-1"  
class="td11"><span 
class="pcrr7t-x-x-120">vn 0.0 1.0 0.0 </span></td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-8-8-"><td  style="white-space:nowrap; text-align:left;" id="TBL-8-8-1"  
class="td11"><span 
class="pcrr7t-x-x-120">vn 1.0 0.0 0.0 </span></td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-8-9-"><td  style="white-space:nowrap; text-align:left;" id="TBL-8-9-1"  
class="td11"><span 
class="pcrr7t-x-x-120">f 1/1 4/4 2/2  </span></td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-8-10-"><td  style="white-space:nowrap; text-align:left;" id="TBL-8-10-1"  
class="td11"><span 
class="pcrr7t-x-x-120">f 1/1 2/2 3/3  </span></td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-8-11-"><td  style="white-space:nowrap; text-align:left;" id="TBL-8-11-1"  
class="td11"><span 
class="pcrr7t-x-x-120">f 1/1 3/3 4/4  </span></td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-8-12-"><td  style="white-space:nowrap; text-align:left;" id="TBL-8-12-1"  
class="td11"><span 
class="pcrr7t-x-x-120">f 2/2 3/3 4/4  </span></td></tr></table>                                                </div></td><td  style="white-space:nowrap; text-align:center;" id="TBL-7-1-2"  
class="td11"><img 
src="pics/tetra.png" alt="PIC"  
></td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-7-2-"><td  style="white-space:nowrap; text-align:left;" id="TBL-7-2-1"  
class="td11">                                                                 </td>
</tr></table></div>
</div>
<br /> <table class="caption" 
><tr style="vertical-align:baseline;" class="caption"><td class="id">Figure&#x00A0;7: </td><td  
class="content">An object file that specifies a tetrahedron with surface normals.</td></tr></table><!--tex4ht:label?: x1-140017 -->

<!--l. 336--><p class="indent" >   </td></tr></table></div><hr class="endfigure">
<!--l. 338--><p class="indent" >   The OBJ files are ASCII text, and contain lists of vertices, normals, texture coordinates, and faces. The
basic structure of an OBJ file is a series of tagged lines with a single piece of data on each line. The
delimiter on each line is whitespace. The recognized tags in ParticleVis are &#8216;v&#8217; for vertex (an xyz value),
&#8216;vn&#8217; for vertex (surface) normal (also xyz), &#8216;vt&#8217; for texture coordinates (two dimensional), and &#8216;f&#8217; for face.
The lists of vertices, normals, and texture coordinates are parsed in-order and are given an
implicit ID corresponding to their order in the file, starting at 1. The format of the &#8216;f&#8217; face tags
then specifies lists of (three) indices: a vertex, an optional normal, and an optional texture
coordinate. These indices are delimited by forward slashes (/), as 1, 2, or 3 indices may be issued
per point. Faces should be specified in clockwise order. See Figure <a 
href="#x1-140017">7<!--tex4ht:ref: fig:obj --></a> for a simple example
file.
   <h3 class="sectionHead"><span class="titlemark">3    </span> <a 
 id="x1-150003"></a>Static Geometry</h3>
<!--l. 341--><p class="noindent" >While the geometry tags can be placed within <span 
class="pcrr7t-x-x-120">&#x003C;particle&#x003E;</span>
tags in any combination to render particle themselves, often it is useful to have a set of geometry that is
unmoving and is not tied to any particle state. The <span 
class="pcrr7t-x-x-120">&#x003C;static&#x003E;</span>
tag is directly analogous to the <span 
class="pcrr7t-x-x-120">&#x003C;particle&#x003E;</span>
tag, except that it specifies a set of geometry that simply remains at rest within the environment. The
<span 
class="pcrr7t-x-x-120">&#x003C;static&#x003E;</span>
tag is enclosed by the outer <span 
class="pcrr7t-x-x-120">&#x003C;particleset&#x003E;</span>
, and only one will be is parsed for each set. Any combination of geometric primitives in any position can
be placed inside it. Since it sits at the origin without rotation, the object space of the static geometry is the
same as the world space.
<!--l. 345--><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">4    </span> <a 
 id="x1-160004"></a>Scene Settings</h3>
<!--l. 346--><p class="noindent" >Since an XML descriptor generally corresponds to a single dataset or single class of data, it is often
desirable to encode scene or viewpoint parameters into the descriptor. The <span 
class="pcrr7t-x-x-120">&#x003C;scene&#x003E;</span>
tag, enclosed in the <span 
class="pcrr7t-x-x-120">&#x003C;particleset&#x003E;</span>
, allows particle and camera parameters to be passed into the rendering engine.
<!--l. 348--><p class="indent" >   A single <span 
class="pcrr7t-x-x-120">&#x003C;scene&#x003E;</span>
tag may contain a block of scene descriptors. These tags describe camera position and projection, marked
particles, axes options, and vector scaling parameters.
      <dl class="description"><dt class="description">
<span 
class="ptmb7t-x-x-120">Camera Tags</span> </dt><dd 
class="description">The tag &#8220;<span 
class="pcrr7t-x-x-120">&#x003C;camera&#x003E; ... &#x003C;/camera&#x003E;</span>
      &#8221; can enclose two subtags that allow the setting of camera axial direction and projection
      type.

           <dl class="description"><dt class="description">
      <span 
class="ptmb7t-x-x-120">Camera Direction</span> </dt><dd 
class="description">By passing &#8220;<span 
class="pcrr7t-x-x-120">&#x003C;direction&#x003E; X|Y|Z &#x003C;/direction&#x003E;</span>
           &#8221; the camera will be set to view down a particular axis (X, Y, or Z) when the XML descriptor
           is loaded.
           </dd><dt class="description">
      <span 
class="ptmb7t-x-x-120">Camera Projection</span> </dt><dd 
class="description">Passing &#8220;<span 
class="pcrr7t-x-x-120">&#x003C;ortho&#x003E; true|false &#x003C;/ortho&#x003E;</span>
           &#8221; will place the camera in an orthographic projection (if &#8216;true&#8217; is passed) or the regular
           perspective projection (if &#8216;false&#8217; is passed).</dd></dl>
      </dd><dt class="description">
<span 
class="ptmb7t-x-x-120">Marking</span> </dt><dd 
class="description">If a &#8220;<span 
class="pcrr7t-x-x-120">&#x003C;mark&#x003E; ID &#x003C;/mark&#x003E;</span>
      &#8221; tag is specified, the particle whose ID matches that passed ID will be highlighted in the scene. Any
      number of <span 
class="pcrr7t-x-x-120">&#x003C;mark&#x003E;</span>
      tags can be passed in, and large sets of particles can be flagged.
      </dd><dt class="description">
<span 
class="ptmb7t-x-x-120">Axes</span> </dt><dd 
class="description">The &#8220;<span 
class="pcrr7t-x-x-120">&#x003C;axes&#x003E; true | false &#x003C;/axes&#x003E;</span>
      &#8221; tag will enable or disable the coordinate axes upon descriptor load.</dd></dl>
<!--l. 359--><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">5    </span> <a 
 id="x1-170005"></a>Miscellaneous Features</h3>
<!--l. 360--><p class="noindent" >Many features in the XML language have evolved in response to specific abilities found in the ParticleVis
renderer, and as such they are difficult to classify. Two are worth noting: the ability to control the surface
orientation of &#8220;inverted&#8221; primitives, and the ability to specify per-particle scalar data in the form of
&#8220;surface maps.&#8221;
<!--l. 362--><p class="indent" >   The tag <span 
class="pcrr7t-x-x-120">&#x003C;flipsurface&#x003E;</span>
sits at the same level as geometric primitives: it can be included within a &#8216;particle&#8217; or &#8216;static&#8217; tag. By
enclosing one or more primitive inside a <span 
class="pcrr7t-x-x-120">&#x003C;flipsurface&#x003E; ... &#x003C;/flipsurface&#x003E;</span>
pair, the &#8220;inverted&#8221; particle attribute may be reversed. This tag only applies when &#8220;inverted&#8221; has been set
to true. By using this pair of tags to enclose primitives, a solid can be constructed from a combination of
front and back faces. For example, if a cutway shell were desired, but interior objects such as
spheres or cones were to be represented normally, the interior primitives could be enclosed in a
<span 
class="pcrr7t-x-x-120">&#x003C;flipsurface&#x003E;</span>
(with inversion enabled) and the desired effect could be achieved.
<!--l. 364--><p class="indent" >   Finally, the <span 
class="pcrr7t-x-x-120">&#x003C;particleset&#x003E;</span>
tag supports two attributes as well. In order to specify a set that has surface-map data applied to it, a tag of
the form <span 
class="pcrr7t-x-x-120">&#x003C;particleset map</span><span 
class="pcrr7t-x-x-120">_filename="mapname" map</span><span 
class="pcrr7t-x-x-120">_resolution="resolution"&#x003E;</span>
is passed. This instructs the parser to load surface map data from the file &#8220;mapname&#8221; of
<span 
class="cmmi-12">resolution </span><span 
class="cmsy-10x-x-120">&#x00D7; </span><span 
class="cmmi-12">resolution </span>points across the surface of each spherical particle.

<!--l. 366--><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">6    </span> <a 
 id="x1-180006"></a>Examples</h3>
<!--l. 367--><p class="noindent" >In this section a series of examples that demonstrate the features of the XML geometry language are
presented.
<!--l. 369--><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">6.1    </span> <a 
 id="x1-190006.1"></a>Spheres</h4>
<!--l. 370--><p class="noindent" ><hr class="figure"><div class="figure" 
><table class="figure"><tr class="figure"><td class="figure" 
>

<a 
 id="x1-190018"></a>

<table 
class="verbatim"><tr class="verbatim"><td 
class="verbatim"><div class="verbatim">
&#x003C;particleset&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x003C;particle&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;sphere&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;radius&#x003E;1.0&#x003C;/radius&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;/sphere&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x003C;/particle&#x003E;
&#x00A0;<br />&#x003C;/particleset&#x003E;
</div>
</td></tr></table>
<!--l. 379--><p class="nopar" >
<br /> <table class="caption" 
><tr style="vertical-align:baseline;" class="caption"><td class="id">Figure&#x00A0;8: </td><td  
class="content">A minimal descriptor for spheres of radius 1.</td></tr></table><!--tex4ht:label?: x1-190018 -->

<!--l. 382--><p class="noindent" ></td></tr></table></div><hr class="endfigure">
<!--l. 383--><p class="indent" >   The first example in Figure <a 
href="#x1-190018">8<!--tex4ht:ref: fig:spheres --></a> represents a minimal descriptor that assigns all loaded particles a sphere
of radius 1. No attributes or additional geometry is specified.
<!--l. 386--><p class="indent" >   <hr class="figure"><div class="figure" 
><table class="figure"><tr class="figure"><td class="figure" 
>

<a 
 id="x1-190029"></a>

<table 
class="verbatim"><tr class="verbatim"><td 
class="verbatim"><div class="verbatim">
&#x003C;particleset&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x003C;particle&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;sphere&#x00A0;count="1000"&#x00A0;r="0"&#x00A0;g="0"&#x00A0;b="1"&#x00A0;textures="false"&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;radius&#x003E;1.0&#x003C;/radius&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;/sphere&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;sphere&#x00A0;count="1000"&#x00A0;r="0"&#x00A0;g="1"&#x00A0;b="0"&#x00A0;quality="2"&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;radius&#x003E;1.0&#x003C;/radius&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;/sphere&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x003C;/particle&#x003E;
&#x00A0;<br />&#x003C;/particleset&#x003E;
</div>
</td></tr></table>
<!--l. 398--><p class="nopar" >
<br /> <table class="caption" 
><tr style="vertical-align:baseline;" class="caption"><td class="id">Figure&#x00A0;9: </td><td  
class="content">A descriptor utilizing attributes to set color and geometry quality.</td></tr></table><!--tex4ht:label?: x1-190029 -->

<!--l. 401--><p class="indent" >   </td></tr></table></div><hr class="endfigure">
<!--l. 402--><p class="indent" >   In Figure <a 
href="#x1-190029">9<!--tex4ht:ref: fig:sphereatt --></a> a set of 1000 red spheres and 1000 green spheres are specified, all with radius 1. The red
spheres have texturing disabled, and the green spheres are two geometry quality levels higher than normal.
The specification of <span 
class="pcrr7t-x-x-120">count="1000"</span>
in the green sphere set is actually unnecessary, as the spheres will map to all remaining particles
(<span 
class="cmmi-12">N </span><span 
class="cmsy-10x-x-120">- </span><span 
class="cmr-12">1000</span>).
   <h4 class="subsectionHead"><span class="titlemark">6.2    </span> <a 
 id="x1-200006.2"></a>Composite Geometries</h4>
<!--l. 408--><p class="noindent" >A more complex example that involves cylinders, caps, and geometric transformations is shown in Figure
<a 
href="#x1-2000110">10<!--tex4ht:ref: fig:composite --></a>. The product of this descriptor is a convex solid, a cylinder with capped ends (or a biconvex tablet).
The <span 
class="pcrr7t-x-x-120">&#x003C;orientation&#x003E;</span>
tag and <span 
class="pcrr7t-x-x-120">&#x003C;position&#x003E;</span>
tags are used together to flip the second cap (<span 
class="cmmi-12">&#x03C0; </span>radians about the X axis) and position it directly on the
cylinder&#8217;s end. The resulting geometry is shown in Figure <a 
href="#x1-2000211">11<!--tex4ht:ref: fig:Biconvex --></a>.
<!--l. 412--><p class="indent" >   In Figure <a 
href="#x1-2000312">12<!--tex4ht:ref: fig:drum --></a> a cylindrical drum (first particle) and two baffles are defined. The drum is inverted, so that
when rendered the back faces will be shown instead of the front. This effect results in a cutaway view that
will allow the interior of the object to be shown. The geometry quality has also been elevated. The
cylindrical drum solid is formed from a cylinder and two truncated cones. The two baffles are simply
plates with appropriate sizes. Setting &#8216;textures&#8217; to false means that the plates will not be textured (when
texturing is enabled in the renderer).
<!--l. 414--><p class="indent" >   <hr class="figure"><div class="figure" 
><table class="figure"><tr class="figure"><td class="figure" 
>

<a 
 id="x1-2000110"></a>

<table 
class="verbatim"><tr class="verbatim"><td 
class="verbatim"><div class="verbatim">
&#x003C;particleset&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x003C;particle&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;cylinder&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;radius&#x003E;0.2&#x003C;/radius&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;length&#x003E;0.1&#x003C;/length&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;position&#x003E;&#x003C;x&#x003E;0&#x003C;/x&#x003E;&#x003C;y&#x003E;0&#x003C;/y&#x003E;&#x003C;z&#x003E;0&#x003C;/z&#x003E;&#x003C;/position&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;/cylinder&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;cap&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;radius&#x003E;0.2&#x003C;/radius&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;height&#x003E;0.05&#x003C;/height&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;position&#x003E;&#x003C;x&#x003E;0&#x003C;/x&#x003E;&#x003C;y&#x003E;0&#x003C;/y&#x003E;&#x003C;z&#x003E;0.05&#x003C;/z&#x003E;&#x003C;/position&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;/cap&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;cap&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;radius&#x003E;0.2&#x003C;/radius&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;height&#x003E;0.05&#x003C;/height&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;position&#x003E;&#x00A0;&#x003C;x&#x003E;0&#x003C;/x&#x003E;&#x00A0;&#x003C;y&#x003E;0&#x003C;/y&#x003E;&#x00A0;&#x003C;z&#x003E;-0.05&#x003C;/z&#x003E;&#x00A0;&#x003C;/position&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;orientation&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;eta&#x003E;3.141593&#x003C;/eta&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;xi&#x003E;0&#x003C;/xi&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;lambda&#x003E;0&#x003C;/lambda&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;/orientation&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;/cap&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x003C;/particle&#x003E;
&#x00A0;<br />&#x003C;/particleset&#x003E;
</div>
</td></tr></table>
<!--l. 441--><p class="nopar" >
<br /> <table class="caption" 
><tr style="vertical-align:baseline;" class="caption"><td class="id">Figure&#x00A0;10: </td><td  
class="content">A composite solid descriptor. The result of this description is a biconvex tablet.</td></tr></table><!--tex4ht:label?: x1-2000110 -->

<!--l. 445--><p class="indent" >   </td></tr></table></div><hr class="endfigure">
<!--l. 447--><p class="indent" >   <hr class="figure"><div class="figure" 
><table class="figure"><tr class="figure"><td class="figure" 
>

<a 
 id="x1-2000211"></a>


<!--l. 449--><p class="noindent" ><img 
src="pics/tablet.png" alt="PIC"  
>
<br /> <table class="caption" 
><tr style="vertical-align:baseline;" class="caption"><td class="id">Figure&#x00A0;11: </td><td  
class="content">The composite solid, a biconvex tablet.</td></tr></table><!--tex4ht:label?: x1-2000211 -->

<!--l. 452--><p class="indent" >   </td></tr></table></div><hr class="endfigure">
<!--l. 454--><p class="indent" >   <hr class="figure"><div class="figure" 
><table class="figure"><tr class="figure"><td class="figure" 
>

<a 
 id="x1-2000312"></a>

<table 
class="verbatim"><tr class="verbatim"><td 
class="verbatim"><div class="verbatim">
&#x003C;particleset&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x003C;particle&#x00A0;inverted="true"&#x00A0;quality="2"&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;cylinder&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;radius&#x003E;304.8e-3&#x003C;/radius&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;length&#x003E;266.7e-3&#x003C;/length&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;/cylinder&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;cone&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;small_radius&#x003E;139.7e-3&#x003C;/small_radius&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;large_radius&#x003E;304.8e-3&#x003C;/large_radius&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;half_angle&#x003E;0.9948&#x003C;/half_angle&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;position&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;x&#x003E;0&#x003C;/x&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;y&#x003E;0&#x003C;/y&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;z&#x003E;0.3313&#x003C;/z&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;/position&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;orientation&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;xi&#x003E;0&#x003C;/xi&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;eta&#x003E;3.141593&#x003C;/eta&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;lambda&#x003E;0&#x003C;/lambda&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;/orientation&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;/cone&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;cone&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;small_radius&#x003E;139.7e-3&#x003C;/small_radius&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;large_radius&#x003E;304.8e-3&#x003C;/large_radius&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;half_angle&#x003E;0.9948&#x003C;/half_angle&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;position&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;x&#x003E;0&#x003C;/x&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;y&#x003E;0&#x003C;/y&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;z&#x003E;-0.3313&#x003C;/z&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;/position&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;/cone&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x003C;/particle&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x003C;particle&#x00A0;count="2"&#x00A0;textures="false"&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;plate&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;corner1&#x003E;&#x00A0;&#x003C;x&#x003E;0&#x003C;/x&#x003E;&#x00A0;&#x003C;y&#x003E;0&#x003C;/y&#x003E;&#x00A0;&#x003C;z&#x003E;0&#x003C;/z&#x003E;&#x00A0;&#x003C;/corner1&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;corner2&#x003E;&#x00A0;&#x003C;x&#x003E;0.2667&#x003C;/x&#x003E;&#x00A0;&#x003C;y&#x003E;0&#x003C;/y&#x003E;&#x003C;z&#x003E;0&#x003C;/z&#x003E;&#x00A0;&#x003C;/corner2&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;corner3&#x003E;&#x00A0;&#x003C;x&#x003E;0.2667&#x003C;/x&#x003E;&#x00A0;&#x003C;y&#x003E;0.0762&#x003C;/y&#x003E;&#x003C;z&#x003E;0&#x003C;/z&#x003E;&#x00A0;&#x003C;/corner3&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;corner4&#x003E;&#x00A0;&#x003C;x&#x003E;0&#x003C;/x&#x003E;&#x00A0;&#x003C;y&#x003E;0.0762&#x003C;/y&#x003E;&#x003C;z&#x003E;0&#x003C;/z&#x003E;&#x00A0;&#x003C;/corner4&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;/plate&#x003E;
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x003C;/particle&#x003E;
&#x00A0;<br />&#x003C;/particleset&#x003E;
</div>
</td></tr></table>
<!--l. 498--><p class="nopar" >
<br /> <table class="caption" 
><tr style="vertical-align:baseline;" class="caption"><td class="id">Figure&#x00A0;12: </td><td  
class="content">The descriptor for a cylindrical drum with conical ends.</td></tr></table><!--tex4ht:label?: x1-2000312 -->

<!--l. 502--><p class="indent" >   </td></tr></table></div><hr class="endfigure">
<!--l. 504--><p class="indent" >   <hr class="figure"><div class="figure" 
><table class="figure"><tr class="figure"><td class="figure" 
>

<a 
 id="x1-2000413"></a>


<!--l. 506--><p class="noindent" ><img 
src="pics/drum.png" alt="PIC"  
>
<br /> <table class="caption" 
><tr style="vertical-align:baseline;" class="caption"><td class="id">Figure&#x00A0;13: </td><td  
class="content">The resulting cylindrical drum geometry.</td></tr></table><!--tex4ht:label?: x1-2000413 -->

<!--l. 509--><p class="indent" >   </td></tr></table></div><hr class="endfigure">
    
</body></html> 



